﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Prowess.OIS.Service.Setting;

namespace Prowess.OIS.Service.TestService
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            OISServiceSetting service = new OISServiceSetting();
            service.host_Opening += new EventHandler(service_host_Opening);
            service.host_Opened += new EventHandler(service_host_Opened);
            try
            {
                service.StartService();
            }
            catch (System.Exception ex)
            {
                textBox1.Text += "\r\nExeption." + ex.Message;
            }
        }

        void service_host_Opened(object sender, EventArgs e)
        {
            textBox1.Text += "\r\nService is started success";
        }

        void service_host_Opening(object sender, EventArgs e)
        {
            textBox1.Text += "\r\nService is starting...";
        }
    }
}
